package com.zkyc.framework.common.vo.website;

import com.zkyc.framework.common.exception.ResultCode;
import com.zkyc.framework.common.utils.GeneralUtil;
import com.zkyc.framework.common.vo.ResultVO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

@Data
@NoArgsConstructor
public class UploadVo<T> extends ResultVO {
    private static Object data;
    private Integer errno;

    private UploadVo(int code, T data, String msg, String requestId, Integer errno) {
        super(code, data, msg, requestId);
        this.errno = errno;
    }

    public static <T> UploadVo<T> insertData(Integer code, T data, String msg, Integer errno) {
        return data(code, data, msg, errno);
    }

    public static <T> UploadVo data(Integer code, T data, String msg, Integer errno) {
        return new UploadVo(code, data, msg, GeneralUtil.getUUid(null), errno);
    }
}
